/**
 * 
 */
package com.java.test.user.dto;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

import org.springframework.jdbc.core.RowMapper;

/**
 * @author Administrator
 *
 */
public class AcountReset implements RowMapper<AcountReset> {

	private String accountUniqueNo;
	
	// 玩家账号id
	private String accountId;

	// 重置类型 1:增加 0减少
	private int resetType;

	// 金额数量
	private Double changAmount;

	// 打马倍数
	private double multiple;

	// 备注
	private String remarks;

	// 添加时间
	private LocalDateTime createTime;
	
	

	public String getAccountUniqueNo() {
		return accountUniqueNo;
	}

	public void setAccountUniqueNo(String accountUniqueNo) {
		this.accountUniqueNo = accountUniqueNo;
	}

	public String getAccountId() {
		return accountId;
	}

	public void setAccountId(String accountId) {
		this.accountId = accountId;
	}

	public int getResetType() {
		return resetType;
	}

	public void setResetType(int resetType) {
		this.resetType = resetType;
	}

	public Double getChangAmount() {
		return changAmount;
	}

	public void setChangAmount(Double changAmount) {
		this.changAmount = changAmount;
	}


	public double getMultiple() {
		return multiple;
	}

	public void setMultiple(double multiple) {
		this.multiple = multiple;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	@Override
	public AcountReset mapRow(ResultSet rs, int rowNum) throws SQLException {
		AcountReset info = new AcountReset();
		info.setAccountId(rs.getString("account_id"));
		info.setChangAmount(rs.getDouble("change_amount"));
		info.setMultiple(rs.getInt("multiple"));
		info.setRemarks(rs.getString("remarks"));
		info.setResetType(rs.getInt("reset_type"));
		info.setCreateTime(rs.getTimestamp("create_time").toInstant().atZone(ZoneOffset.ofHours(8)).toLocalDateTime());
		return info;
	}

}
